package top.z.work.module.system.constant;

/**
 * 管理员角色标识枚举
 */
public enum AdminRoleCode {

    ADMIN(1L, "admin", "管理员");

    // 角色编码
    private final Long   roleId;
    // 角色编码
    private final String roleCode;
    // 角色名称
    private final String roleName;

    AdminRoleCode(Long roleId, String roleCode, String roleName) {
        this.roleId = roleId;
        this.roleCode = roleCode;
        this.roleName = roleName;
    }

    public Long roleId() {
        return roleId;
    }

    public String roleCode() {
        return roleCode;
    }

    public String roleName() {
        return roleName;
    }

    public static boolean adminId(Long roleId) {
        return ADMIN.roleId().equals(roleId);
    }

    public static boolean adminCode(String roleCode) {
        return ADMIN.roleCode().equals(roleCode);
    }

    public static boolean adminName(String roleName) {
        return ADMIN.roleName().equals(roleName);
    }

}
